﻿/*
 * Copyright © 2020, Wuxi Safover Intelligent Technology Co., Ltd. All rights reserved.
 * 
 * 无锡安永智能科技有限公司版权所有，未经许可，不得用于商业用途
 * 
 * Visit: https://www.safover.com/ 
 */


using System.IO.Ports;

namespace Safover.LidarCollector.Core
{
    public interface ISerialPortControl
    {
        /// <summary>
        /// Serial device should have default port name. 
        /// Default port name may change, so the real name should be from configution.
        /// </summary>
        string PortName { get; set; }

        int BaudRate { get; set; }

        int DataBits { get; set; }

        Parity Parity { get; set; }

        StopBits StopBits { get; set; }

        Handshake Handshake { get; set; }

        int WriteTimeout { get; set; }

        int ReadTimeout { get; set; }

        void KeepOpenSerialPort();

        void CloseSerialPort();

        bool IsSerialPortOpen { get; }
    }
}
